package com.dnjn.happiness.survey.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 考核记录对象 svy_check
 *
 * @author happiness
 * @date 2024-04-01
 */
@Schema(name = "Check", description = "考核记录")
@Accessors(chain = true)
@Getter
@Setter
@TableName("svy_check")
public class Check extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "check_id", type = IdType.ASSIGN_ID)
    private Long checkId;


    

    /** 考核类型：STAFF-员工;MANAGER */
    @Schema(description = "考核类型：STAFF-员工;MANAGER")
    @Excel(name = "考核类型：STAFF-员工;MANAGER")
    private String checkType;

    /** 考核人数 */
    @Schema(description = "考核人数")
    @Excel(name = "考核人数")
    private Integer checkTotal;

    /** 是否删除|0-否 1-是|valid */
    @Schema(description = "是否删除|0-否 1-是|valid")
    @Excel(name = "是否删除|0-否 1-是|valid")
    private String deleted;


    @Schema(description = "选中的被考核人id")
    @TableField(exist = false)
    private List<Long> userIdList;

    @Schema(description = "每个人具体信息")
    @TableField(exist = false)
    private List<com.dnjn.happiness.survey.domain.CheckItem> checkItemList;

//    @Schema(description = "题目")
//    @TableField(exist = false)
//    private List<CheckQuestion> checkQuestionList;
    @Schema(description = "发起人id")
    @TableField(exist = false)
    private Long initiatorId;




    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("checkId", getCheckId())
                .append("checkType", getCheckType())
                .append("checkTotal", getCheckTotal())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("deleted", getDeleted())
                .append("version", getVersion())
                .toString();
    }
}
